package com.cn.oop;

/**
 * @author: chenyuncong
 * @Date: 2020/6/18 15:15
 */
public class TestOOM {
    private int deep;
    public void test(){
        deep++;
        test();
    }

    public static void main(String[] args) {
        TestOOM oom=new TestOOM();
        try{
            oom.test();
        }catch (Throwable e){
            e.printStackTrace();
            System.out.println(oom.deep);
        }

    }
}
